package com.caishi.lkx.exam.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.caishi.lkx.common.model.Seo;
import com.zzw.common.entity.impl.BaseEntity;
import com.zzw.common.service.model.NameModel;
import com.zzw.common.service.model.base.SortModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import net.minidev.json.annotate.JsonIgnore;

import java.util.List;

@Schema(title = "行业")
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "ex_industry")
public class IndustryModel extends BaseEntity<IndustryModel> implements NameModel<IndustryModel, String>, SortModel<IndustryModel>, CstkModel, Seo {

    @Schema(title = "行业名称")
    private String name;

    /**
     * 后台显示名称
     */
    private String serverName;

    private Integer sort;

    @Schema(title = "图标")
    private String icon;

    @JsonIgnore
    private String cstkId;

    @TableField(exist = false)
    private Integer examCount;

    @TableField(exist = false)
    @Schema(title = "考试列表")
    private List<ExamModel> exams;

    @Override
    public String getCode() {
        return getId();
    }

    @Override
    public String getKeyword() {
        return getName();
    }

    /**
     * 认证标志
     * 0000 0000  ---- --机构认证 用户认证
     */
    @TableField(exist = false)
    private byte authFlag;
}
